﻿@model IEnumerable<GameSchool.Models.VideoLecture>

@{
    ViewBag.Title = "ShowAllVideos";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>ShowAllVideos</h2>

<p>
      @Html.ActionLink("Create New", "CreateVideo")
</p>

  
         
      

@foreach (var item in Model.OrderByDescending(x => x.VideoLectureId)) {
    
        <h3>
            @Html.DisplayFor(modelItem => item.VideoTitle)
        </h3>
      
        <div>
            @Html.ActionLink("Edit", "EditVideo", new { id=item.VideoLectureId }) 
        </div>
    
   
    
        <div>
            <iframe title="YouTube video player" width="480" height="390" 
            src="http://www.youtube.com/embed/@Html.DisplayFor(modelItem => item.VideoUrl)" frameborder="1" allowfullscreen></iframe>
        </div>
      <hr/>
}



   